Skip to content

Count repository creation contributions in streaks - #931

Open
victorjudysen wants to merge 1 commit into
DenverCoder1:mainfrom
victorjudysen:feature/repository-creation-contributions
Open

Count repository creation contributions in streaks#931
victorjudysen wants to merge 1 commit into
DenverCoder1:mainfrom
victorjudysen:feature/repository-creation-contributions

Conversation

@victorjudysen

Copy link
Copy Markdown
Contributor

Summary

  • Fetch repository creation contributions from GitHub's contributionsCollection
  • Merge repository creation dates into the daily contribution map without double-counting days already counted by the calendar
  • Add regression coverage for a repo-creation-only day preserving the daily streak

Closes #919

Tests

  • TOKEN=dummy ./vendor/bin/phpunit --testdox tests/StatsTest.php --filter testRepositoryCreationContribution
  • php -l src/stats.php
  • php -l tests/StatsTest.php
  • npx prettier --check src/stats.php tests/StatsTest.php
  • git diff --check

Notes

  • repositoryContributions(first: 100) covers up to 100 created repositories within a queried year. Handling more would require paginating repositoryContributions in the contribution graph fetch path.

@victorjudysen
victorjudysen marked this pull request as ready for review July 30, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streak does not count days when the only activity is creating a repository

1 participant